<?php

$host = 'localhost';
$username = 'root';
$password = '';
$dbName = 'b20';

mysql_connect($host, $username ,$password) or
            die(mysql_error().'<br>Unable to establish connection with MYSQL');
mysql_select_db($dbName) or
            die(mysql_error.'<br>Unable to select Database');
$date = date('Y-m-d H:i:s');
$insert = "INSERT INTO `practice` SET
     `added_date`='$date',
     `email`='amit@sharma.com',
     `password`='123456',
     `name`='Andi Gutmans',
     `status`='1'";

mysql_query($insert) or die(mysql_error());

$rowsInserted =  mysql_affected_rows();
$lastId = mysql_insert_id();

echo "<p>$rowsInserted Rows Insetred on Id:$lastId<p>";

